#include <stdio.h>
#include <unistd.h>
#include <stdbool.h>
#include <signal.h>
#define _XOPEN_SOURCE 700
void handle_sigint(int signum)
{
    printf("Print! I got a signal: %d\n",signum);
}
int main()
{
    struct sigaction sa;
    sa.sa_handler = handle_sigint;
    sigemptyset(&sa.sa_mask);
    sa.sa_flags = 0;
    sigaction(SIGINT,&sa,NULL);
    while(true)
    {
        printf("Hello World\n");
        sleep(1);
    }
    return 0;
}
